<?php
include_once 'field.class.php';

class field_addtime extends field
{
    protected $fieldname = '发布日期';
    
    public function __construct($field='')
    {
        parent::__construct($field);
        $this->field_type = 'int';
    }
    
    function create_form($value='')
    {
        $value = empty($value) ? date('Y-m-d H:i:s', TIME) : date('Y-m-d H:i:s', $value);
        $field = $this->field_data['field'];
        $form = date_tool("data[$field]", $value, 1);
        return $form;
    }

}
?>
